package reflect;

import java.lang.reflect.Method;

public class ReflectDemo5 {
    public static void main(String[] args) throws Exception{
        Class cls=Class.forName("reflect.Person");
        Object o = cls.newInstance();
        Method method=cls.getMethod("say",String.class,int.class);
        method.invoke(o,"大家好！",4);



    }
}
